package com.linq.cool.api.factory;

import com.linq.cool.api.feign.RemoteSysRoleService;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @Author: yqlin
 * @Date: 2021/1/17 05:11
 * @Description: 角色服务降级处理
 * @Version: 1.0.0
 */
@Slf4j
@Component
public class RemoteSysRoleFallbackFactory implements FallbackFactory<RemoteSysRoleService> {
    @Override
    public RemoteSysRoleService create(Throwable throwable) {
        log.error("角色服务调用失败:{}", throwable.getMessage());
        return new RemoteSysRoleService() {

        };
    }
}
